import sys

from PyQt5 import QtWidgets
from user_ui import User_UI

class Start(QtWidgets.QMainWindow):
    """
    启动窗口
    """
    def __init__(self):
        super(Start, self).__init__()
        self.user_ui = User_UI()
        self.setupUI()

    def setupUI(self):
        self.setWindowTitle("程序启动界面")
        self.setGeometry(100,100,500,500)
        self.Qbutton1()
        self.Qbutton2()

    def Qbutton1(self):
        qbutton = QtWidgets.QPushButton(self)
        qbutton.setText("用户界面")
        qbutton.setGeometry(100,200,100,100)
        qbutton.clicked.connect(self.Qbutton1_click)

    def Qbutton1_click(self):
        self.close()
        self.user_ui.setupUI()
        self.user_ui.show()


    def Qbutton2(self):
        self.close()
        qbutton = QtWidgets.QPushButton(self)
        qbutton.setText("系统管理界面")
        qbutton.setGeometry(300,200,100,100)
        qbutton.clicked.connect(self.Qbutton2_click)

    def Qbutton2_click(self):
        self.close()
        from super_ui import super_ui
        self.superUI = super_ui()
        self.superUI.setupUI()
        self.superUI.show()


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    ui = Start()
    ui.show()
    sys.exit(app.exec_())
